import React from 'react';
import {inject, observer} from 'mobx-react';

import E9CustomElement from './E9CustomElement';

@inject('portalLoginStore')
@observer
class E9Custom extends React.Component {
    render() {
        const {portalLoginStore} = this.props;
        const {state = {}} = portalLoginStore;
        const {customElements = []} = state;

        return (
            <div className="e9login-custom">
                {
                    customElements.map((item, index) => {
                        return <E9CustomElement key={index} item={item}/>;
                    })
                }
            </div>
        );
    }
}

export default E9Custom;
